package com.itfreer.power.dictionary;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;
import com.itfreer.form.dictionary.LocalDictionaryBase;
import com.itfreer.form.dictionary.base.DictionaryItem;

/**
 * 系统服务接品字典
 */
@Component
public class SysServiceDictionary extends LocalDictionaryBase {

	@Override
	public String getDictionaryName() {
		return "p_sys_service";
	}

	@Override
	protected List<DictionaryItem> getDictionarys() {
		List<DictionaryItem> list = new ArrayList<DictionaryItem>();
		
		DictionaryItem item = new DictionaryItem();
		item.setId("1");
		item.setCode("1");
		item.setDisplay("单点登录权限");
		item.setOrder(1);
		item.setInfo("单点登录认证服务");
		List<String> urls = new ArrayList<String>();
		urls.add("/rest/v1/tickets");
		urls.add("/rest/ticketsValidate/*");
		urls.add("/rest/v1/serviceTickets/*");
		urls.add("/rest/v1/proxyGrantingTickets/*");
		urls.add("/rest/v1/proxyTickets/*");
		urls.add("/rest/v1/tickets/*");
		urls.add("/rest/serviceValidate");
		urls.add("/rest/v1/addServices/*");
		urls.add("/rest/v1/exitService/*");
		urls.add("/rest/proxyValidate");
		urls.add("/rest/v1/ticketAttributes/*");
		
		item.getOther().put("urls", urls);
		list.add(item);
		
		item = new DictionaryItem();
		item.setId("2");
		item.setCode("2");
		item.setDisplay("用户数据访问权限");
		item.setOrder(2);
		item.setInfo("用户数据访问权限");
		urls = new ArrayList<String>();
		urls.add("/rest/vuserinfo/getEntitys");
		urls.add("/rest/vuserinfo/getRowCounts");
		urls.add("/rest/vuserinfo/getEntity/*");
		item.getOther().put("urls", urls);
		list.add(item);
		
		item = new DictionaryItem();
		item.setId("3");
		item.setCode("3");
		item.setDisplay("政区数据访问权限");
		item.setOrder(3);
		item.setInfo("政区数据访问权限");
		urls = new ArrayList<String>();
		urls.add("/rest/administrative/getEntitys");
		urls.add("/rest/administrative/getRowCounts");
		urls.add("/rest/administrative/getEntity/*");
		
		item.getOther().put("urls", urls);
		list.add(item);
		
		item = new DictionaryItem();
		item.setId("4");
		item.setCode("4");
		item.setDisplay("组织机构、部门数据访问权限");
		item.setOrder(4);
		item.setInfo("组织机构、部门数据访问权限");
		urls = new ArrayList<String>();
		urls.add("/rest/organization/getEntitys");
		urls.add("/rest/organization/getRowCounts");
		urls.add("/rest/organization/getEntity/*");
		urls.add("/rest/department/getEntitys");
		urls.add("/rest/department/getRowCounts");
		urls.add("/rest/department/getEntity/*");
		item.getOther().put("urls", urls);
		list.add(item);
		
		item = new DictionaryItem();
		item.setId("5");
		item.setCode("5");
		item.setDisplay("系统权限数据访问权限");
		item.setOrder(5);
		item.setInfo("系统权限数据访问权限");
		urls = new ArrayList<String>();
		urls.add("/rest/power/checkPassword/**");
		urls.add("/rest/power/getUserRoles");
		urls.add("/rest/power/getRoleService");
		urls.add("/rest/power/addUserService");
		urls.add("/rest/power/removeUserService");
		urls.add("/rest/power/getRoleMenus");
		urls.add("/rest/power/getRoleUrls");
		urls.add("/rest/power/getRoleDatas");
		urls.add("/rest/power/getRoleMapLayers");
		urls.add("/rest/power/getRoleMapExtent");
		item.getOther().put("urls", urls);
		list.add(item);
		
		item = new DictionaryItem();
		item.setId("6");
		item.setCode("6");
		item.setDisplay("数据规范数据访问权限");
		item.setOrder(6);
		item.setInfo("数据规范数据访问权限");
		urls = new ArrayList<String>();
		urls.add("/rest/metadatadirectory/getEntitys");
		urls.add("/rest/metadatadirectory/getRowCounts");
		urls.add("/rest/metadatadirectory/getEntity/*");
		
		urls.add("/rest/dictionary/getEntitys/*");
		urls.add("/rest/dictionary/getEntitys");
		urls.add("/rest/dictionary/getRowCounts");
		urls.add("/rest/dictionary/getEntity/*");
		
		urls.add("/rest/metadata/getEntitys/*");
		urls.add("/rest/metadata/getEntitys");
		urls.add("/rest/metadata/getRowCounts");
		urls.add("/rest/metadata/getEntity/*");
		
		item.getOther().put("urls", urls);
		list.add(item);
		
		return list;
	}
}